<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title></title>
    <style>
        p{
            border:dotted;
            width: 5em;
            /* white-space: nowrap; */
            /* 空格符 不因空格符换行 */
            overflow: hidden;
            text-overflow:ellipsis;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            line-clamp: 2;
            -webkit-box-orient: vertical;
        }
    </style>
</head>
<body>
    <p>hello world</p>
    <p>你好世界</p>
    <p>2021fg北京 
        冬奥会是个事实所所所所所所所所所所所所所
    </p>
</body>
</html>